short FindBestBoard (BoardPtr board, BoardJudgeProc judgeboard, short player, MovePtr move, short level, PruneJudgeProc judgeprune, short alfa, short beta);
short FindBestMove (BoardPtr board, MoveJudgeProc judgeboard, short player, MovePtr move, short level, short alfa, short beta);
// These functions iterate over all moves recursively,
// to determine the best move for a given strategy.
// They use a standard minimax search algorithm with alfa-beta pruning.
short FindGoodBoard (BoardPtr board, BoardJudgeProc judgeboard, short player, MovePtr move, short level, PruneJudgeProc judgeprune, short alfa, short beta);
short FindNiceBoard (BoardPtr board, BoardJudgeProc judgeboard, short player, MovePtr move, short level);
// Special case of the above.
short GenerateMoves (BoardPtr board, BoardJudgeProc judgeboard, short player, short level);
// Generate all valid moves, compute the corresponding board values
// and store the result in a global array.
// The actual number of valid moves is returned.
void SortMoves (short n_moves);
int CompareEvals (const void *e1, const void *e2);
#endif
#ifdef COMPUTE_C
#include "Game.h"
#include "Global.h"
#include "Interface.h"
#include "Settings.h"
#include <StdLib.h> // qsort, malloc
#include <String.h> // memcpy
Boolean AlfaBeta (short player, short value, short *minSoFar, short *maxSoFar, short *alfa, short *beta);
//Boolean PlayerHasBallOnOuterRing (BoardPtr board, short player);